<?php

namespace App\Models;

use Encore\Admin\Traits\DefaultDatetimeFormat;
use Illuminate\Database\Eloquent\Model;

class StockDepot extends Model
{
    use DefaultDatetimeFormat;
    protected $table = 'stock_depot';

    public function product()
    {
        return $this->belongsToMany(StockProduct::class, 'stock_depot_product', 'depot_id', 'product_id')->withPivot('num');
    }
}
